package com.shiminghui;

public class ShuZiJiaMi {
    public static void main(String[] args) {


        int num = 12346;
        int num1=num;
        int count=0;
        while (num!=0){
            num=num/10;
            count++;
        }
        int[] arr =new int[count];

        for (int i = arr.length-1; i >=0; i--) {
            arr[i]=num1%10;
            num1=num1/10;
        }
        for(int i:arr){
            System.out.print(i+"\t");
        }
        System.out.println();
        for (int i = 0; i < arr.length; i++) {
            arr[i]+=5;
            arr[i]%=10;
        }
        for(int i:arr){
            System.out.print(i+"\t");
        }
        System.out.println();
        for (int i = 0; i < arr.length/2; i++) {
            int temp = arr[i];
            arr[i]=arr[arr.length-1-i];
            arr[arr.length-1-i]=temp;
        }

        for(int i:arr){
            System.out.print(i+"\t");
        }
        int number=0;
        for(int i:arr){
            number=number*10+i;
        }
        System.out.println("\n"+number);
    }
}
